package com.schoolgard.entitybean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SystemLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "SYSTEM_LOG")
public class SystemLog implements java.io.Serializable {

	// Fields

	private Long id;
	private SystemClass systemClass;
	private Date datetime;
	private String content;
	private String status;
	private Long userId;
	private String userName;
	private Date confirmDatetime;
	private String router;
	private String guid;

	// Constructors

	/** default constructor */
	public SystemLog() {
	}

	/** minimal constructor */
	public SystemLog(Long id, SystemClass systemClass) {
		this.id = id;
		this.systemClass = systemClass;
	}

	/** full constructor */
	public SystemLog(Long id, SystemClass systemClass, Date datetime,
			String content, String status, Long userId, String userName,
			Date confirmDatetime, String router, String guid) {
		this.id = id;
		this.systemClass = systemClass;
		this.datetime = datetime;
		this.content = content;
		this.status = status;
		this.userId = userId;
		this.userName = userName;
		this.confirmDatetime = confirmDatetime;
		this.router = router;
		this.guid = guid;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SYSTEM_CLASS_ID", nullable = false)
	public SystemClass getSystemClass() {
		return this.systemClass;
	}

	public void setSystemClass(SystemClass systemClass) {
		this.systemClass = systemClass;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATETIME", length = 7)
	public Date getDatetime() {
		return this.datetime;
	}

	public void setDatetime(Date datetime) {
		this.datetime = datetime;
	}

	@Column(name = "CONTENT", length = 510)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "STATUS", length = 1)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "USER_ID", precision = 10, scale = 0)
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "USER_NAME", length = 64)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CONFIRM_DATETIME", length = 7)
	public Date getConfirmDatetime() {
		return this.confirmDatetime;
	}

	public void setConfirmDatetime(Date confirmDatetime) {
		this.confirmDatetime = confirmDatetime;
	}

	@Column(name = "ROUTER", length = 1024)
	public String getRouter() {
		return this.router;
	}

	public void setRouter(String router) {
		this.router = router;
	}

	@Column(name = "GUID", length = 64)
	public String getGuid() {
		return this.guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

}